<?php
class MSite extends Model
{
    var $site_config;
    
    function MSite()
    {
        parent::Model();
        $this->get_site_config();
    }
    
    private function get_site_config() 
    {
        $sql = "
            SELECT * FROM ".db_table_config."
        ";
        $query = $this->db->query($sql);
        if($query->num_rows)
        {
            while($row = $query->_fetch_object()) 
            {
                $this->site_config[$row->key] = $row->value;
            }
        }
    }
}